package com.finley.flowabledemo.controller;

import com.finley.flowabledemo.service.TestLogService;
import com.plumelog.trace.annotation.Trace;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/log")
@Slf4j
public class TestLogController {


    @Resource
    private TestLogService testLogService;

    @GetMapping("/print/{id}")
    @Trace
    public Object print(@PathVariable Integer id) {
        log.info("id:{}", id);
        testLogService.print(id);
        return id;
    }
}
